<div class="row animated" ng-class="{true: 'fadeInRight', false:'fadeInLeft'}[currentAnimated]">
  <div class="col-xs-12 col-md-12">
    <div class="panel panel-default">
      <div class="panel-heading">
        <a ng-click="discard()" href="javascript:;"><i class="backBtn fa fa-arrow-circle-left"></i></a>
        <span class="panelTitle" ng-bind="UserForm.title"></span>
      </div>
      <div class="panel-body">
        <form novalidate method="post" role="form" name="userForm" class="form-horizontal" ng-submit="updateLevel(user)">
          <div class="form-group" ng-class="{'has-error': userForm.level.$invalid && userForm.level.$dirty}">
            <label class="col-xs-3 col-md-2 control-label">当前级别：</label>
            <div class="col-xs-7 col-md-8">
              <input type="text" name="currentLevel" class="form-control w25c" placeholder="当前级别" ng-model="user.currentLevel" readonly/>
            </div>
          </div>
          <div class="form-group" ng-class="{'has-error': userForm.userlevel.$invalid && userForm.userlevel.$dirty}" ng-if="user.model === 1">
            <label class="col-xs-3 col-md-2 control-label">用户级别：</label>
            <div class="col-xs-7 col-md-8">
              <select name="userlevel" class="form-control w25c" ng-model="user.userlevel" required>
                <option value="">----请选择----</option>
                <option ng-repeat="item in user.userLevelList" value="{{item.propertyName}}">{{item.desc}}</option>
              </select>
            </div>
          </div>
          <div class="form-group" ng-class="{'has-error': userForm.agentlevel.$invalid && userForm.agentlevel.$dirty}" ng-if="user.model === 2">
            <label class="col-xs-3 col-md-2 control-label">代理商级别：</label>
            <div class="col-xs-7 col-md-8">
              <select name="agentlevel" class="form-control w25c" ng-model="user.agentlevel" required>
                <option value="">----请选择----</option>
                <option ng-repeat="item in user.agentLevelList" value="{{item.propertyName}}">{{item.desc}}</option>
              </select>
            </div>
          </div>
          <div class="col-xs-offset-2 col-md-offset-2 col-xs-offset-10 col-md-offset-10">
            <button class="btn btn-primary" type="submit" ng-click="submitForm()"  ng-disabled="userForm.$invalid">保存</button>&nbsp;&nbsp;<span class="text-danger" ng-if="UserForm.error" ng-bind="UserForm.error"></span>
          </div>
        </form>
      </div>
    </div>    
  </div>
</div>